package modele;

import java.util.Date;
import java.util.List;
import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Transient;
import javax.persistence.Embeddable;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import utils.JsonDateSerializer;

/**
 * <p>Pojo mapping TABLE docentete</p>
 * <p></p>
 *
 * <p>Generated at Sat Feb 26 23:34:05 CET 2011</p>
 * @author Salto-db Generator v1.0.16 / EJB3
 * 
 */
@Entity
@Table(name = "docentete")
@SuppressWarnings("serial")
public class Docentete implements Serializable {

	/**
	 * Attribute idDocentete.
	 */
	private Integer idDocentete;
	
	/**
	 * Attribute doCommentaire.
	 */
	private String doCommentaire;
	
	/**
	 * Attribute doDate.
	 */
	private Date doDate;
	
	/**
	 * Attribute doDatelivr.
	 */
	private Date doDatelivr;
	
	/**
	 * Attribute doPiece.
	 */
	private String doPiece;
	
	/**
	 * Attribute doRef.
	 */
	private String doRef;
	
	/**
	 * Attribute doStatut.
	 */
	private Integer doStatut;
	
	/**
	 * Attribute depot
	 */
	 private Depot depot;	

	 private Integer idDepot;
	/**
	 * Attribute idDomaine.
	 */
	private Integer idDomaine;
	
	/**
	 * Attribute idType.
	 */
	private Integer idType;
	
	/**
	 * Attribute refTiers.
	 */
	private String refTiers;
	
	/**
	 * Attribute utilisateur
	 */
	 private Utilisateur utilisateur;
	 
	 private Integer idUtilisateur;
	/**
	 * Attribute compteg
	 */
	 private Compteg compteg;	
	 private Integer idCompteg;
	
	/**
	 * List of Docligne
	 */
	private List<Docligne> doclignes = null;

	
	/**
	 * <p> 
	 * </p>
	 * @return idDocentete
	 */
	@Basic
	@Id
	@GeneratedValue
	@Column(name = "id_docentete")
		public Integer getIdDocentete() {
		return idDocentete;
	}

	/**
	 * @param idDocentete new value for idDocentete 
	 */
	public void setIdDocentete(Integer idDocentete) {
		this.idDocentete = idDocentete;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return doCommentaire
	 */
	@Basic
	@Column(name = "do_commentaire", length = 60)
		public String getDoCommentaire() {
		return doCommentaire;
	}

	/**
	 * @param doCommentaire new value for doCommentaire 
	 */
	public void setDoCommentaire(String doCommentaire) {
		this.doCommentaire = doCommentaire;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return doDate
	 */
	@Basic
	@JsonSerialize(using=JsonDateSerializer.class)
	@Column(name = "do_date")
		public Date getDoDate() {
		return doDate;
	}

	/**
	 * @param doDate new value for doDate 
	 */
	public void setDoDate(Date doDate) {
		this.doDate = doDate;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return doDatelivr
	 */
	@Basic
	@JsonSerialize(using=JsonDateSerializer.class)
	@Column(name = "do_datelivr")
		public Date getDoDatelivr() {
		return doDatelivr;
	}

	/**
	 * @param doDatelivr new value for doDatelivr 
	 */
	public void setDoDatelivr(Date doDatelivr) {
		this.doDatelivr = doDatelivr;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return doPiece
	 */
	@Basic
	@Column(name = "do_piece", length = 9)
		public String getDoPiece() {
		return doPiece;
	}

	/**
	 * @param doPiece new value for doPiece 
	 */
	public void setDoPiece(String doPiece) {
		this.doPiece = doPiece;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return doRef
	 */
	@Basic
	@Column(name = "do_ref", length = 20)
		public String getDoRef() {
		return doRef;
	}

	/**
	 * @param doRef new value for doRef 
	 */
	public void setDoRef(String doRef) {
		this.doRef = doRef;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return doStatut
	 */
	@Basic
	@Column(name = "do_statut")
		public Integer getDoStatut() {
		return doStatut;
	}

	/**
	 * @param doStatut new value for doStatut 
	 */
	public void setDoStatut(Integer doStatut) {
		this.doStatut = doStatut;
	}
	
	/**
	 * get depot
	 */
	@ManyToOne
	@JsonIgnore
	@JoinColumn(name = "id_depot",insertable=false ,updatable=false)
	public Depot getDepot() {
		return this.depot;
	}
	
	/**
	 * set depot
	 */
	public void setDepot(Depot depot) {
		this.depot = depot;
	}

	/**
	 * <p> 
	 * </p>
	 * @return idDomaine
	 */
	@Basic
	@Column(name = "id_domaine")
		public Integer getIdDomaine() {
		return idDomaine;
	}

	/**
	 * @param idDomaine new value for idDomaine 
	 */
	public void setIdDomaine(Integer idDomaine) {
		this.idDomaine = idDomaine;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return idType
	 */
	@Basic
	@Column(name = "id_type")
		public Integer getIdType() {
		return idType;
	}

	/**
	 * @param idType new value for idType 
	 */
	public void setIdType(Integer idType) {
		this.idType = idType;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return refTiers
	 */
	@Basic
	@Column(name = "ref_tiers", length = 19)
		public String getRefTiers() {
		return refTiers;
	}

	/**
	 * @param refTiers new value for refTiers 
	 */
	public void setRefTiers(String refTiers) {
		this.refTiers = refTiers;
	}
	
	/**
	 * get utilisateur
	 */
	@ManyToOne
	@JsonIgnore
	@JoinColumn(name = "id_utilisateur",insertable=false ,updatable=false)
	public Utilisateur getUtilisateur() {
		return this.utilisateur;
	}
	
	/**
	 * set utilisateur
	 */
	public void setUtilisateur(Utilisateur utilisateur) {
		this.utilisateur = utilisateur;
	}

	/**
	 * get compteg
	 */
	@ManyToOne
	@JsonIgnore
	@JoinColumn(name = "id_compteg",insertable=false ,updatable=false)
	public Compteg getCompteg() {
		return this.compteg;
	}
	
	/**
	 * set compteg
	 */
	public void setCompteg(Compteg compteg) {
		this.compteg = compteg;
	}

	/**
	 * Get the list of Docligne
	 */
	@JsonIgnore
	@OneToMany(mappedBy="docentete")
	 public List<Docligne> getDoclignes() {
	 	return this.doclignes;
	 }
	 
	/**
	 * Set the list of Docligne
	 */
	 public void setDoclignes(List<Docligne> doclignes) {
	 	this.doclignes = doclignes;
	 }

	public void setIdDepot(Integer idDepot) {
		this.idDepot = idDepot;
	}

	@Basic
	@Column(name = "id_depot")
	public Integer getIdDepot() {
		return idDepot;
	}

	public void setIdUtilisateur(Integer idUtilisateur) {
		this.idUtilisateur = idUtilisateur;
	}

	@Basic
	@Column(name = "id_utilisateur")
	public Integer getIdUtilisateur() {
		return idUtilisateur;
	}

	public void setIdCompteg(Integer idCompteg) {
		this.idCompteg = idCompteg;
	}

	@Basic
	@Column(name = "id_compteg")
	public Integer getIdCompteg() {
		return idCompteg;
	}


}